import { Component, OnInit,Input,Output,EventEmitter,ElementRef } from '@angular/core';

@Component({
  selector: 'app-foo',
  templateUrl: './foo.component.html',
  styleUrls: ['./foo.component.css']
})
export class FooComponent implements OnInit {

  @Input() message:string;
  @Output() ok=new EventEmitter<any>();

  constructor(private elementRef:ElementRef) { }

  ngOnInit() {
  }
  
  close(){
     document.body.removeChild(this.elementRef.nativeElement);
  }

}
